package com.huike.clues.mapper;

import com.huike.clues.domain.TbAssignRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
* @author 93238
* @description 针对表【tb_assign_record(分配记录表)】的数据库操作Mapper
* @createDate 2023-10-12 06:35:46
* @Entity com.huike.clues.domain.TbAssignRecord
*/
public interface TbAssignRecordMapper extends BaseMapper<TbAssignRecord> {

    int countAssignCluesByUser(@Param("userId") Long userId);

    int countAssignBusinessByUser(Long userId);

    List<TbAssignRecord> selectAssignRecordList(TbAssignRecord assignRecord);

    int updateAssignRecord(TbAssignRecord tbAssignRecord);

    TbAssignRecord selectAssignRecordByAssignId(@Param("assignId") Long assignId, @Param("type") String type);

    int updateLatest(@Param("assignId") Long assignId, @Param("type") String type);

    int insertAssignRecord(TbAssignRecord tbAssignRecord);

    void distribution(Long[] ids, Long userId, String userName);

}




